package com.incar.chuxing.base;


public class BaseResultBean<T> {

    public static final int RESULT_SUCCESS = 0;

    private int status;

    private String message;

    private T attachment;

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getAttachment() {
        return attachment;
    }

    public void setAttachment(T attachment) {
        this.attachment = attachment;
    }

    public void setResultSuccess(int status) {
        this.status = status;
    }

    public boolean isSuccess() {
        return RESULT_SUCCESS == status;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "resultCode=" + status +
                ", errorMsg='" + message + '\'' +
                ", attachment=" + attachment +
                '}';
    }
}
